package cn.stylefeng.guns.config.test;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

/**
 * @Author pzp .
 * @Date 2019/8/39:08
 */

@Slf4j
@Component("dBThread")
@Scope("prototype")//spring 多例
public class DBThread implements Runnable {
    private String msg;


    @Override
    public void run() {
        //模拟在数据库插入数据

        //systemLogService.insert(systemlog);
        log.info("insert->" + msg);
    }


    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
